home *** CD-ROM | disk | FTP | other *** search
/ Star Trek Starfleet Academy Mini Omnipedia / MINI_OMNI.ISO / pc / omni_v2.dxr / 00410_HelpRoll Parent.ls < prev    next >
Encoding:
Text File  |  1996-04-15  |  2.3 KB  |  60 lines

  1. property iActiveRectList, iActiveListlen, iExceptionList, iActiveExceptionlist, iLocList
  2.  
  3. on birth me, pRectList
  4.   set iActiveRectList to pRectList
  5.   set iActiveListlen to count(iActiveRectList)
  6.   set vPixelcast to the number of cast "PixelREF"
  7.   set iExceptionList to [#ENCY: [24, 27, 28], #EPIS: [24, 26, 27, 28], #CHRO: [24, 26, 28], #Resources: [24, 26, 27, 28, 29], #TOPICS: [26, 27, 28, 29], #FoundSet: [24, 26, 27], #EPISSUB: [24, 26, 27, 28]]
  8.   set iLocList to [#EPIS: [the number of cast "EpisBASE", 236, 150], #ENCY: [the number of cast "AlphBASE", 240, 150], #CHRO: [the number of cast "Fake for help", 234, 150], #FoundSet: [the number of cast "FoundsetBase", 239, 150], #Resources: [vPixelcast, -300, -300], #TOPICS: [vPixelcast, -300, -300], #EPISSUB: [the number of cast "EpisBASE", 236, 150]]
  9.   return me
  10. end
  11.  
  12. on mModeNum me, pModeName
  13.   return findPos(iExceptionList, pModeName)
  14. end
  15.  
  16. on mSetHelpMode me, pMode
  17.   if integerp(pMode) then
  18.     set pMode to getPropAt(iExceptionList, pMode)
  19.   end if
  20.   set iActiveExceptionlist to getaProp(iExceptionList, pMode)
  21.   set vExceptionCast to getaProp(iLocList, pMode)
  22.   if not (the puppet of sprite 38) then
  23.     puppetSprite(38, 1)
  24.   end if
  25.   set the castNum of sprite 38 to getAt(vExceptionCast, 1)
  26.   set the locH of sprite 38 to getAt(vExceptionCast, 2)
  27.   set the locV of sprite 38 to getAt(vExceptionCast, 3)
  28.   if pMode = #TOPICS then
  29.     set the visible of sprite 39 to 1
  30.   else
  31.     set the visible of sprite 39 to 0
  32.   end if
  33.   updateStage()
  34. end
  35.  
  36. on mRectRoll me
  37.   set vShiftVal to mSearchActiverectList(me, point(the mouseH, the mouseV))
  38.   go(marker(0) + 1 + vShiftVal)
  39. end
  40.  
  41. on mSearchActiverectList me, pMousePoint
  42.   set vFound to 0
  43.   set vPartToCheck to 1
  44.   repeat while (vPartToCheck <= iActiveListlen) and (vFound = 0)
  45.     set vListtocheck to getAt(iActiveRectList, vPartToCheck)
  46.     set vNumPartRects to count(vListtocheck)
  47.     set vRectToCheck to 1
  48.     repeat while (vFound = 0) and (vRectToCheck <= vNumPartRects)
  49.       set vFound to inside(pMousePoint, getAt(vListtocheck, vRectToCheck))
  50.       set vRectToCheck to vRectToCheck + 1
  51.       if vFound then
  52.         set vFound to vFound * (getOne(iActiveExceptionlist, vPartToCheck) = 0)
  53.       end if
  54.     end repeat
  55.     set vPartToCheck to vPartToCheck + 1
  56.   end repeat
  57.   set vPartToCheck to vPartToCheck - 1
  58.   return vFound * vPartToCheck
  59. end
  60.